IF EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('SubscriberInsert') AND sysstat & 0xf = 4)
    DROP PROCEDURE [SubscriberInsert]
GO
CREATE PROCEDURE [SubscriberInsert]
(
    @SubscriberId int = null output,
    @Name nvarchar(200),
    @Email nvarchar(200),
    @Telephone nvarchar(100),
    @CreateDate datetime
)
AS
BEGIN
	SET NOCOUNT ON
	INSERT INTO [subscriber](
        [name],
        [email],
        [telephone],
        [create_date]
	)
	VALUES(
        @Name,
        @Email,
        @Telephone,
        @CreateDate
	)
	SELECT @SubscriberId = SCOPE_IDENTITY()
END
GO